package com.syq.dao;

import com.syq.dto.SysDeviceDto;
import com.syq.pojo.SysDevice;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface DeviceMapper {

    @Insert("insert into sys_device (device_id,device_name,categy_id) values(#{deviceId},#{deviceName},#{categyId})")
    void addDevice(SysDeviceDto sysDeviceDto);

    @Update("update sys_device set status = 1 where device_id=#{deviceId}")
    int update2Sell(String deviceId);

    @Select("select * from sys_device where device_id=#{deviceId}")
    SysDevice findByDeviceId(String deviceId);
}
